const express = require('express');

const app = express();

app.get('/books', (req, res) => {
  return res.json([
    {
      id: 1,
      name: '三体',
    },
    {
      id: 2,
      name: '上门龙婿'
    },
    {
      id:3,
      name: '斗破苍穹'
    }
  ])
})

app.listen(3002, () => {
  console.log('服务已经启动.... 3002 端口监听中....');
})